﻿using System;
using UnityEngine;

public class Effect : MonoBehaviour
{
    private void Awake()
    {
        foreach (AudioSource source in base.GetComponentsInChildren<AudioSource>())
        {
            source.spatialBlend = 1f;
            AudioManager.RegisterSoundSource(source);
        }
    }

    private void OnEnable()
    {
        this.StartWaitForSeconds(10f, () => this.Recycle<Effect>());
    }
}

